﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace RentACarRESTApi.Models
{
    public class Car
    {
        public int ID { get; set; }
        public string Name { get; set; }
        public string Make { get; set; }
        public string Model { get; set; }
        public List<Link> Links { get; set; }
        
        public Car()
        {

        }

        public Car(int id, string name, string make, string model)
        {
            this.ID = id;
            this.Name = name;
            this.Make = make;
            this.Model = model;

            Links = new List<Link>();
            Links.Add(new Link(rel: "/linkrels/cars/" + ID + "/details", uri: "/api/cars/" + ID));
        }
    }
}